<?php
header("content-type:text/html;charset=utf8");
$id=$_GET['hid'];
$news_name=$_GET['news_name'];
$news_content=$_GET['news_content'];
$dbh=new PDO('mysql:host=localhost;dbname=mhsw','root','root');
$sql="update news set news_name='$news_name',news_content='$news_content' where id='$id'";
//echo $sql;die;
$arr=$dbh->exec($sql);
if($arr)
{
    echo "修改成功";
}
else
{
    echo "修改失败";
}
?>